package com.hst.capacity.infra.persistence.jpa.agent;

import com.hst.capacity.domain.model.entity.franchisee.AgentEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface AgentInforRepository extends JpaRepository<AgentEntity, String>, JpaSpecificationExecutor<AgentEntity> {

    /**
     * 根据代理商ID查找代理商信息
     * @param idAgent
     * @return
     */
    AgentEntity findByIdAgent(String idAgent);

    /**
     * 根据电话查询代理商电话已经存在
     * @param agentTel
     * @return
     */
    AgentEntity findByAgentTel(String agentTel);

    List<AgentEntity> findByIdFranchisee(String idFranchisee);
}
